public class Test {

	public static void main(String[]args) {
		People p1 = new Student("小王",5225,"计算机网络实验室     ","组成原理实验室          " ,"电路模拟电子技术实验室");
		People p2 = new Student("小孙", 2750,"人工智能科学与技术实验室", "电路模拟电子技术实验室   ", "无");
		System.out.println("学生信息：");
		System.out.println(p1);
		System.out.println(p2);
		System.out.println("************************************************************************************************************************");
		//学生信息
		
		Room  r1 = new Room("计算机网络实验室      ", "优秀");// 得奖金500元优秀获
		Room  r2 = new Room("计算机网络实验室      ", "及格");//及格获得奖金300元
		Room  r3 = new Room("计算机网络实验室      ", "不及格");// 不及格无奖金
		Room  r4 = new Room("人工智能科学与技术实验室", "优秀");//奖金600元
		Room  r5 = new Room("人工智能科学与技术实验室", "及格");//300￥
		Room  r6 = new Room("人工智能科学与技术实验室", "不及格");// 不及格无奖金
		Room  r7 = new Room("电路模拟电子技术实验室", "优秀");//500￥
		Room  r8 = new Room("电路模拟电子技术实验室", "及格");//250￥
		Room  r9 = new Room("电路模拟电子技术实验室", "不及格");//0￥
		Room r10 = new Room("组成原理实验室        ", "优秀");//600￥
		Room r11 = new Room("组成原理实验室        ", "及格");//300￥
		Room r12 = new Room("组成原理实验室        ", "不及格");//0￥
		Room r13 = new Room("无        ", "无成绩");//0￥
		
		System.out.println("-----------------------------------------------------------------------------");
		System.out.println("小王的成果:");
		System.out.println("小王等级为" +  r1.level + "的实验室为:" + p1.lab1);
		System.out.println("小王等级为" +  r7.level + "的实验室为:" + p1.lab2);
		System.out.println("小王等级为" + r11.level + "的实验室为:" + p1.lab3);
		System.out.println("小孙的成果:");
		System.out.println("小孙等级为" +  r5.level + "的实验室为:" + p2.lab1);
		System.out.println("小孙等级为" +  r8.level + "的实验室为:" + p2.lab2);
		System.out.println("小孙等级为" + r13.level + "的实验室为:" + p2.lab3);
		System.out.println("-----------------------------------------------------------------------------");
		try {
			double result1 = Tax.sum(500, 600,250);
			System.out.println("小王一周的收入为:" + result1);
			p1.income = result1;
			p1.income = p1.income * 5;
			double result2 = Tax.sum(300, 250,0);
			System.out.println("小孙一周的收入为:" + result2);
			p2.income = result2;
			p2.income = p2.income * 5;
			System.out.println("-----------------------------------------------------------------------------");
	
			System.out.println("小王的总收入为：" + p1.income);
			System.out.println("小孙的总收入为:" + p2.income);
			//两人不含税的净收入
			System.out.println("-----------------------------------------------------------------------------");
			double result5 = Tax.avg(p1.income);
			System.out.println("小王税后的收入为：" + result5);
			double result6 = Tax.avg(p2.income);
			System.out.println("小孙税后的收入为:" + result6);
			System.out.println("-----------------------------------------------------------------------------");
			//两人含税的收入
		} catch (MyException e) {
			System.out.println(e);
		}
		System.out.println("program over");
	}
}


